package com.cw.jeeyt.common.utils;

import java.io.File;
import java.io.IOException;

import freemarker.template.Configuration;

public class FreemarkerConfiguration {

    public static Configuration getConfiguation(String templatePath) {
        Configuration config = new Configuration(Configuration.VERSION_2_3_30);
        try {
            config.setDirectoryForTemplateLoading(new File(templatePath));
        } catch (IOException e) {
            e.printStackTrace();
        }
        config.setDefaultEncoding("UTF-8");
        return config;
    }
}
